package com.china.api.wechat.processor.main;

import java.util.HashMap;
import java.util.Map;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * @Description:
 * @author:larry
 * @version:v1.0.0
 * @Created:2013-10-18上午11:31:00
 * @Modified:
 */
public class ReplyMappingRegister {

	private static final Logger log = LoggerFactory.getLogger(ReplyMappingRegister.class);
	private static Map<String, ReplyMapping> map = new HashMap<String, ReplyMapping>();

	public static void register(String key, ReplyMapping am) {
		if (map.containsKey(key)) {
			log.error("exist replyMapping:{}", key);
		}
		map.put(key, am);
	}

	public static ReplyMapping fetch(String key) {
		return map.get(key);
	}
}
